<html>
<head><meta charset="utf-8"><title>customizing output filename · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html">customizing output filename</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220161237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220161237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Herman <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220161237">(Dec 16 2020 at 19:28)</a>:</h4>
<p>Hey all! I see that in Nightly cargo has <code>--out-dir</code> but no way to set the output filename, and you can pass <code>cargo:rustc-cdylib-link-arg=-o</code> to tell rustc what filename to create but it doesn't work correctly with caching. Is there any way to customize the output filename so that cargo's caching logic still works?</p>



<a name="220168543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220168543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220168543">(Dec 16 2020 at 20:28)</a>:</h4>
<p><span class="user-mention" data-user-id="372208">@David Herman</span> you can customize somewhat with <code>lib.name</code> in the manifest, but otherwise there's no way to customize it</p>



<a name="220172656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220172656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220172656">(Dec 16 2020 at 21:02)</a>:</h4>
<p><span class="user-mention" data-user-id="372208">@David Herman</span> Can you give an example of what you're trying to do?</p>



<a name="220183182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220183182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Herman <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220183182">(Dec 16 2020 at 22:35)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> the Neon project builds native Node.js modules in rust, which are DLL’s conventionally named <code>index.node</code></p>



<a name="220183305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220183305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Herman <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220183305">(Dec 16 2020 at 22:36)</a>:</h4>
<p>We’d like to be able to build with bare cargo, without a wrapper script that does stuff like rename the final file. A wrapper script imposes a nonstandard UX on end users, who’d rather be able to just call <code>cargo build</code></p>



<a name="220184271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220184271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220184271">(Dec 16 2020 at 22:44)</a>:</h4>
<p>Interesting. So, these are ELF shared libraries, but they're conventionally named <code>.node</code> rather than <code>.so</code>?</p>



<a name="220184274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220184274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220184274">(Dec 16 2020 at 22:44)</a>:</h4>
<p>That doesn't seem unreasonable to me.</p>



<a name="220184342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220184342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220184342">(Dec 16 2020 at 22:45)</a>:</h4>
<p>I personally wouldn't object to an <code>output-filename</code> option, to appear alongside <code>name</code>, as long as it only applied to <code>cdylib</code>.</p>



<a name="220186229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220186229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Herman <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220186229">(Dec 16 2020 at 23:04)</a>:</h4>
<p>What’s the best way to make this happen? An RFC, or just a cargo issue?</p>



<a name="220186530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220186530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Herman <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220186530">(Dec 16 2020 at 23:07)</a>:</h4>
<p>I mean to propose it</p>



<a name="220191293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220191293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220191293">(Dec 17 2020 at 00:05)</a>:</h4>
<p><span class="user-mention" data-user-id="372208">@David Herman</span> I'd suggest a very short RFC, that cites this specific example and probably at least one more where people might need to build a shared library with a specific naming convention.</p>



<a name="220193092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220193092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220193092">(Dec 17 2020 at 00:28)</a>:</h4>
<p>Ah this makes me remember, I think <a href="https://github.com/rust-lang/cargo/issues/1706">https://github.com/rust-lang/cargo/issues/1706</a> is basically this as well</p>



<a name="220196800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220196800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Herman <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220196800">(Dec 17 2020 at 01:22)</a>:</h4>
<p>Ooh yes! And that issue is linked to <a href="https://github.com/rust-lang/cargo/issues/8628">https://github.com/rust-lang/cargo/issues/8628</a> which exactly describes the category of use case I'm working in.</p>



<a name="220223659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220223659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220223659">(Dec 17 2020 at 09:53)</a>:</h4>
<p><a href="https://github.com/rust-lang/cargo/issues/1706#issuecomment-442891843">https://github.com/rust-lang/cargo/issues/1706#issuecomment-442891843</a> in particular mentions this use case.</p>



<a name="220255964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220255964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220255964">(Dec 17 2020 at 15:20)</a>:</h4>
<p>I would like output file name to also be allowed on executable</p>



<a name="220278284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220278284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Herman <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220278284">(Dec 17 2020 at 17:54)</a>:</h4>
<p>If I tried to write my own PR to implement this would I regret my life decisions? I see there's a comment in 1706 with tips on implementation. Any links to "how to make your first contribution to cargo"?</p>



<a name="220284174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220284174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Herman <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220284174">(Dec 17 2020 at 18:40)</a>:</h4>
<p>Ooh neat! <a href="https://doc.crates.io/contrib/">https://doc.crates.io/contrib/</a> Let's see how this goes :D</p>



<a name="220284262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220284262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220284262">(Dec 17 2020 at 18:41)</a>:</h4>
<p>Thank <span class="user-mention" data-user-id="120518">@Eric Huss</span> for that :-P</p>



<a name="220284366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220284366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Herman <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220284366">(Dec 17 2020 at 18:42)</a>:</h4>
<p>Thank you <span class="user-mention" data-user-id="120518">@Eric Huss</span> &lt;3</p>



<a name="220310495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220310495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Herman <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220310495">(Dec 17 2020 at 22:12)</a>:</h4>
<p>What on earth is this <code>im-a-teapot</code> thing? I'm trying to follow the instructions in the comment in <a href="http://features.rs">features.rs</a> and it sent me to <code>Manifest::feature_gate</code> which just checks if it's … a … teapot?</p>



<a name="220311292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220311292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220311292">(Dec 17 2020 at 22:19)</a>:</h4>
<p>It is a unstable feature flag used to test if cargo is correctly handling unstable feature flags.</p>



<a name="220311384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220311384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220311384">(Dec 17 2020 at 22:20)</a>:</h4>
<p>It is used for tests like "can you use unstable feature flag on nightly but not on stable"</p>



<a name="220311844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220311844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Herman <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220311844">(Dec 17 2020 at 22:25)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> can you help me understand what the instructions in the <code>features.rs</code> comment are telling me when they say I should update <code>Manifest::feature_gate</code>? That method isn't documented so I can't quite figure out what it's for.</p>



<a name="220312652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220312652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220312652">(Dec 17 2020 at 22:32)</a>:</h4>
<p>I would love to help, but unfortunately I need to get offline for tonight. Sorry.</p>



<a name="220390029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220390029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220390029">(Dec 18 2020 at 16:03)</a>:</h4>
<p><span class="user-mention" data-user-id="372208">@David Herman</span> still have the same question? I can try to help out</p>



<a name="220488928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220488928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Herman <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220488928">(Dec 19 2020 at 21:49)</a>:</h4>
<p>Thanks <span class="user-mention" data-user-id="116015">@Alex Crichton</span>! But I'm having second thoughts about this feature. See: <a href="https://github.com/rust-lang/cargo/issues/1706#issuecomment-748407208">https://github.com/rust-lang/cargo/issues/1706#issuecomment-748407208</a> -- I'd be curious what you think.</p>



<a name="220498249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220498249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220498249">(Dec 20 2020 at 02:16)</a>:</h4>
<p><span class="user-mention" data-user-id="372208">@David Herman</span> responded on thread, but I think both filename and filestem still make sense</p>



<a name="220500384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220500384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Herman <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220500384">(Dec 20 2020 at 03:28)</a>:</h4>
<p>What does the filename option mean, in your mind, given that there may be multiple files?</p>



<a name="220511104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220511104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220511104">(Dec 20 2020 at 09:23)</a>:</h4>
<p>I imagine that it either errors or tries it's damndest to figure out what you probably meant for the other files</p>



<a name="220540038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220540038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220540038">(Dec 20 2020 at 22:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116015">@Alex Crichton</span> Is there any multi-file case other than PDB on Windows?</p>



<a name="220615066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220615066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220615066">(Dec 21 2020 at 18:38)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> <code>.dSYM</code> on macOS is similar, and emscripten I think emits js/wasm</p>



<a name="220615388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220615388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220615388">(Dec 21 2020 at 18:41)</a>:</h4>
<p>Is there any naming convention for what to name a .dSYM on macOS for a binary?</p>



<a name="220615480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220615480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220615480">(Dec 21 2020 at 18:42)</a>:</h4>
<p>If you had a program <code>abc-42.xyz</code>, can you just append .dSYM?</p>



<a name="220615545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220615545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220615545">(Dec 21 2020 at 18:42)</a>:</h4>
<p>AFAIK it's "always append <code>.dSYM</code>" but I haven't tested</p>



<a name="220626409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220626409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220626409">(Dec 21 2020 at 20:23)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> FYI, <a href="https://github.com/rust-lang/cargo/blob/e10b79189d123d197766b26dff76ec910558ee12/src/cargo/core/compiler/build_context/target_info.rs#L353-L376">here</a> is how Cargo handles dSYM naming conventions.  The link <a href="https://lldb.llvm.org/use/symbols.html">https://lldb.llvm.org/use/symbols.html</a> contains some more information about how macOS finds dSYM filenames.</p>



<a name="220626726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220626726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220626726">(Dec 21 2020 at 20:27)</a>:</h4>
<p>Oh, so even in the dynamic library case, the extension is .dylib.dSYM?</p>



<a name="220626760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220626760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220626760">(Dec 21 2020 at 20:27)</a>:</h4>
<p>In that case, I think we could just append .dSYM to whatever file name the user supplies in the manifest.</p>



<a name="220626942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220626942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220626942">(Dec 21 2020 at 20:29)</a>:</h4>
<p>Yea, I think so.</p>



<a name="220627154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220627154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220627154">(Dec 21 2020 at 20:31)</a>:</h4>
<p>Then I wonder what the algorithm is that windows uses to find a PDB file from an executable or library.</p>



<a name="220627299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220627299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220627299">(Dec 21 2020 at 20:33)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="224872">@Ryan Levick</span></p>



<a name="220627547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220627547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220627547">(Dec 21 2020 at 20:35)</a>:</h4>
<p>I believe this is correct: <a href="https://docs.microsoft.com/en-us/windows/win32/debug/symbol-paths">https://docs.microsoft.com/en-us/windows/win32/debug/symbol-paths</a></p>



<a name="220627668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220627668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220627668">(Dec 21 2020 at 20:37)</a>:</h4>
<p>Look at that function <code>file_types</code>, it explains PDB as well.  The absolute path to the PDB is embedded in the executable, and is the filename is <code>crate_name.pdb</code>.  Ideally I think Cargo should be running <code>rustc</code> with <code>-o</code> to avoid the underscore/hyphen swap.</p>



<a name="220627714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220627714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220627714">(Dec 21 2020 at 20:37)</a>:</h4>
<p>(Sorry, haven't been following this discussion, so I'm not too sure if you already knew that.)</p>



<a name="220627910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220627910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220627910">(Dec 21 2020 at 20:39)</a>:</h4>
<p>(And look towards the top of that function for how it handles Windows import libraries with different linkers.)</p>



<a name="220644543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220644543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220644543">(Dec 21 2020 at 23:51)</a>:</h4>
<p><span class="user-mention" data-user-id="120518">@Eric Huss</span> I was trying to find the standard mechanism for when the path isn't embedded. (Also, I didn't realize that the <em>absolute path</em> was embedded; ick. So much for reproducible builds...)</p>



<a name="220644581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/customizing%20output%20filename/near/220644581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/customizing.20output.20filename.html#220644581">(Dec 21 2020 at 23:52)</a>:</h4>
<p>But in any case, it looks like executables and libraries with nonstandard extensions may be supported.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>